home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / AllegroCL11 / read me 1.1 < prev   
Encoding:
Text File  |  1987-10-28  |  19.8 KB  |  437 lines  |  [TEXT/CCL ]

  1. Allegro CL release 1.1 Release Notes                       October 28, 1987
  2.  
  3. Copyright © Coral Software Corp
  4.  
  5.  
  6. This document describes changes in Allegro CL 1.1, and includes additions to
  7. the printed documentation.
  8.  
  9. Please read the following notes carefully.  They provide information which is
  10. not given elsewhere.
  11.  
  12.  
  13.  
  14. HIGHLIGHTS
  15.  
  16. Many version 1.0 bugs have been fixed in Version 1.1.  Perhaps the most
  17. important were a bug that caused crashes on 68000-based Macintoshes, and
  18. several bugs in hash tables.  If you had bugs in version 1.0, please check to
  19. make sure that they are fixed in this version.  There are a small number of
  20. outstanding bugs that we are aware of.  These are listed at the end of this
  21. file.
  22.  
  23. A comprehensive index has been added to the manual.
  24.  
  25. Definitions of traps and records are no longer built into the system;  they are
  26. now given as source code.  To use traps or records, you should load the
  27. corresponding files from the library folder.  A good technique is to place
  28. (REQUIRE 'TRAPS) and/or (REQUIRE 'RECORDS) at the top of any files which use
  29. these definitions.
  30.  
  31.       Removing these definitions freed up about 80K more heap space for
  32.       user programs. The trap definitions now include many Macintosh II
  33.       traps, including color quickdraw traps.
  34.  
  35.       Besides traps and records, code written for version 1.0 should run
  36.       without alteration in version 1.1.  You should not need to recompile
  37.       your files.
  38.  
  39. Allegro CL now runs in the background under Multifinder.  This means that you
  40. can perform all Lisp operations--including compiling files--while using another
  41. program in the foreground.
  42.  
  43. Several example files have been added.
  44.  
  45. Allegro CL version 1.1 is dedicated to the people who gave us feedback on
  46. version 1.0.  Thanks!
  47.  
  48.  
  49.  
  50. TOOLS
  51. The list-definitions dialog no longer performs unnecessary window refreshing.
  52.  
  53. The Apropos menu-item now uses a simpler dialog.  To get the functionality of
  54. the version 1.0 Apropos dialog, load the file library;Smart-Apropos.lisp.
  55.  
  56. The variables for determining the size and position of the listener were
  57. improperly documented in release 1.0.  The correct names of the variables are
  58. *LISTENER-WINDOW-SIZE* and *LISTENER-WINDOW-POSITION*.
  59.  
  60.  
  61. FRED
  62. When a fred window search causes scrolling, the found text is no longer placed
  63. at the top of the window.  Instead, there are a number of lines left visible
  64. above the found text.  The number is determined by the variable
  65. *NEXT-SCREEN-CONTEXT-LINES* (which is also used by the fred commands for
  66. scrolling from the keyboard).
  67.  
  68. Fred windows now store and display their window-filenames with embedded escape
  69. characters.  This fixes a problem that came up in version 1.0 when editing
  70. files with names which contained exclamation points and semicolons.
  71.  
  72. The functions IN-PACKAGE and EXPORT now work properly with a window's package.
  73.  
  74. There are now three methods for setting a window's package.  In addition to
  75. the standard mode-line and the function SET-WINDOW-PACKAGE, a window's package
  76. will be set if the first expression in the window is an IN-PACKAGE
  77. statement.  As with a mode-line, this method only works if the expression
  78. is there when the window is opened.  It does not work by simply making
  79. the IN-PACKAGE statement the first form typed into or evaluated from the
  80. window.
  81.  
  82.  
  83. OBJECTS
  84. INIT-LIST-DEFAULT is now a macro, as documented.  Each KEY argument is
  85. evaluated.  The EXPRESSIONs are only evaluated if they are used.
  86. Examples:
  87.   (setq args '(:a 1 b 2 :c 3))
  88.   (init-list-default args 'b 20 :c 30 :d (+ 4 40) 'e (+ 5 50))
  89.         =>  (:D 44 E 55 :A 1 B 2 :C 3)
  90.   args  =>  (:A 1 B 2 :C 3)
  91.  
  92.   (init-list-default args :a (progn (print "shouldn't") 10) 
  93.                           :d (progn (print "should") (+ 4 40))) =>
  94.   "should"  ;printed
  95.   (:D 44 :A 1 B 2 :C 3)  ;value returned
  96.  
  97. The root object now maintains an OBJECT-CHILDREN instance variable.
  98.  
  99. The function REMAKE-OBJECT does not propagate the new inheritance path to
  100. its children and instances.  This is a bug.
  101.  
  102.  
  103. WINDOWS
  104. When WINDOW-DRAW-CONTENTS is called, drawing is clipped to the update-region.
  105. the update-region includes areas which the operating system thinks needs to be
  106. redrawn (e.g. the portions of a window which have been uncovered).  To add an
  107. area to the update-region, call the trap _INVALRECT or _INVALRGN.
  108. To force redrawing of the entire window, you can use
  109. (WITH-PORT WPTR
  110.   (_INVALRECT :PTR (RREF WPTR WINDOW.PORTRECT)))
  111.  
  112. Note that the traps _INVALRECT and _INVALRGN cause the Macintosh to post
  113. an update event.  Because update events are handled asynchronously, these
  114. traps can immediately force an update.  If you wish to invalidate several
  115. areas before updating, place the calls in the body of a WITHOUT-INTERRUPTS.
  116.  
  117. Whenever a window is created or uncovered, an update event is posted for the
  118. window.  The next time events are processed, WINDOW-UPDATE-EVENT-HANDLER
  119. will be called, which will in turn call WINDOW-DRAW-CONTENTS.  The usual
  120. version of WINDOW-DRAW-CONTENTS erases the area within the window's update
  121. region (which generally means the entire contents of the window).
  122.  
  123. Because event processing occurs asynchonously, WINDOW-UPDATE-EVENT-HANDLER may
  124. not be called for some time after the window is created or uncovered
  125. (in the default environment, up to 1/3 of a second).  This means that drawing
  126. performed in the window immediately after the window is created or uncovered
  127. may be erased when WINDOW-UPDATE-EVENT-HANDLER is eventually called.  To fix
  128. this problem, simply call the function EVENT-DISPATCH before drawing into the
  129. window.  EVENT-DISPATCH forces the processing of any pending events.  Note, it
  130. is only necessary to call EVENT-DISPATCH when drawing occurs soon after a
  131. window is created or uncovered.
  132.  
  133. SET-WINDOW-FONT merges the given font-spec with the window's current font
  134. spec.  Say a window currently uses the font-spec ("MONACO" 9 :PLAIN :SRCCOPY),
  135. Having it (SET-WINDOW-FONT 12) will change it to ("MONACO" 12 :PLAIN :SRCCOPY).
  136. In Allegro CL 1.0 it would have changed it to ("CHICAGO" 12 :PLAIN :SRCCOPY).
  137.  
  138. There is a typo on page 6-3, in the Windows chapter.  In the example at the
  139. bottom of the page, the call to EXIST should be given the argument NIL, rather
  140. than no argument.
  141.  
  142. Documentation for supporting the Save and Save As… menu-items has been added
  143. to the Windows chapter.  It appears on the chapter's last page.
  144.  
  145. The object function WINDOW-HARDCOPY may be defined for any window or class of
  146. windows.  If a window has a definition of WINDOW-HARDCOPY, then the Print
  147. menu-item will be enabled when that window is on top.  The WINDOW-HARDCOPY
  148. function will be called when the user chooses the Print menu-item.
  149.  
  150. The EXIST function for windows can take a :WPTR init-list option.  If given,
  151. this should be a pointer to a window record on the Macintosh heap.  The new
  152. window object will be built around this record.  This option can be used to
  153. integrate new types of windows (e.g. color windows), into the object system. 
  154. When this is done, the windows should be created invisibly, and then shown
  155. after they are set up.
  156.  
  157. When the user clicks in the zoom-box of a window, the zooming is done by
  158. calling WINDOW-ZOOM-EVENT-HANDLER.  This function may be shadowed.  It takes
  159. one argument, which will be 8 if the window is zooming to the default
  160. position, and 7 if it is zooming to the alternate position.
  161.  
  162. Grow icons are now drawn correctly in resizable windows.  If you wish to
  163. explicitly redraw a grow-icon (e.g. after you have drawn over it), you should
  164. call the function WINDOW-DRAW-GROW-ICON.  When a window is not the active
  165. window, WINDOW-DRAW-GROW-ICON erases the rectangle where the grow icon appears.
  166.  
  167. Two object variables constrain the way in which windows may be resized and
  168. moved with the mouse.  These are WINDOW-GROW-RECT and WINDOW-DRAG-RECT.  Both
  169. these variables should point to rectangle records (though the data in
  170. WINDOW-GROW-RECT is actually used as two points).
  171.  
  172.    The two corner points of WINDOW-GROW-RECT determine the minimum and
  173.    maximum size that the user can grow the window with the mouse.  Note
  174.    that the user can still zoom the window to other sizes, and the other
  175.    sizes can be set with the function SET-WINDOW-SIZE.
  176.  
  177.    The rectangle WINDOW-DRAG-RECT constrains moving the window with the mouse.
  178.    Whenever the mouse moves outside this rectangle, the gray drag rectangle
  179.    disappears, indicating that the user is out-of-bounds.  Note, this effect
  180.    is determined by the position of the mouse, not the potential new position
  181.    of the window.  If the user clicks in the right or left side of the title
  182.    bar, he/she will be able to drag the window within a different range.
  183.  
  184.    Most windows do not have an instance variable for these values. 
  185.    Instead, they use the values inherited from the class *WINDOW*.  If
  186.    you wish to constrain a particular class or instance, you must
  187.    first give it its own copy of the variable by asking it to HAVE the
  188.    variable.  If you just do a SETQ without first doing a have, you will
  189.    be effecting *WINDOW*'s variables, and all windows will be effected.
  190.  
  191.    Because the rectangles used by WINDOW-DRAG-RECT and WINDOW-GROW-RECT
  192.    are stored on the Macintosh heap, they are not garbage collected. 
  193.    Any instance which has one of the rectangles must dispose of it
  194.    explicitly.  This is most conveniently done by calling DISPOSE-RECORD
  195.    from within WINDOW-CLOSE.
  196.  
  197.  
  198. DIALOGS
  199. The following function can be used to force the redrawing of a single cell in
  200. a table.  This often looks much better than redrawing the entire table (which
  201. is what happens when you call DIALOG-ITEM-DRAW).  It is useful when you change
  202. the value of one cell and want to update the table.
  203.  
  204. (defobfun (draw-cell *table-dialog-item*) (cell)
  205.   (let* ((cell-pos (cell-position cell)))
  206.     (when cell-pos
  207.       (with-port (ask my-dialog wptr)
  208.         (rlet ((cell-rect rect))
  209.           (rset cell-rect rect.topleft cell-pos)
  210.           (rset cell-rect rect.bottomright (add-points cell-pos
  211.                                                        (cell-size)))
  212.           (ccl::draw-table-cell cell
  213.                                 cell-rect
  214.                                 (cell-selected-p cell)))))))
  215.  
  216. *USER-DIALOG-ITEM* holds an abstract class of dialog-items which should be used
  217. as the parent of any dialog-item classes created by the programmer.  See the
  218. icon-dialog-items file for an example.
  219.  
  220. DIALOG-ITEM-CLICK-EVENT-HANDLER is the function called by the event system
  221. when the user clicks on a dialog item.  This function usually performs mouse-
  222. tracking, and (if the mouse is released while still over the dialog-item)
  223. calls DIALOG-ITEM-ACTION.  See the icon-dialog-items file for an example of the
  224. use of this function.
  225.  
  226. PROGRAMMING FRED
  227. The variable *CONTROL-X-COMTAB* is bound to the comtab used by the control-x
  228. keystroke.
  229.  
  230. Each fred-window maintains an instance variable LAST-COMMAND.  Whenever a fred
  231. command is run, the special variable *LAST-COMMAND* is bound to the value of
  232. this instance variable.  A fred command can set the value of the instance
  233. variable or check the value of the special variable.  In this way a fred
  234. command can respond to context (e.g. by doing something different if it is
  235. called several times in a row).  Most built-in fred commands simply set
  236. LAST-COMMAND to NIL.
  237.  
  238. The function GET-SELECTED-STRING returns--as a string--the selection from
  239. the topmost fred window.  If the topmost fred window has no text selected, nil
  240. is returned.  Note that this function can take a very long time if an entire
  241. large buffer is selected.
  242.  
  243.  
  244. EVENTS
  245. WINDOW-CLICK-EVENT-HANDLER is not called when the user clicks in a control in
  246. a window (such as a scroll-bar).  Instead, the function WINDOW-CONTROL-CLICK-
  247. EVENT-HANDLER is called.  If you want to build a window with controls, you
  248. should define this function for the window.  WINDOW-CONTROL-CLICK-EVENT-HANDLER
  249. is not really necessary, and will probably be removed from a future release, but
  250. you may need to use it in the mean time.
  251. WINDOW-CONTROL-CLICK-EVENT-HANDLER takes four arguments:  CONTROL-HANDLE, CODE,
  252. WHERE, and MODS.  CONTROL-HANDLE is a handle to the control which was clicked.
  253. CODE indicates the part of the control which was clicked.  WHERE is the mouse
  254. position where the click occured.  And MODS indicates which modifier keys were
  255. held down during the click.
  256.  
  257. The function WINDOW-KEY-EVENT-HANDLER is not called when the command key is
  258. held down.  This is a bug.
  259.  
  260.  
  261.  
  262.  
  263. DEBUGGING
  264. The methods for getting into and out of break loops has been cleaned up.
  265. Command-. causes an abort, which throws to top level or up one break level.
  266.    Command-. is no longer used to enter a break-loop.
  267. Command-, causes a break.
  268. Command-/ causes a continue.
  269. The abort/break/continue functionality is also available through menu-items on
  270. on the Eval menu, and through the functions ABORT, BREAK, and CONTINUE.
  271.  
  272. The backtrace dialog no longer displays the addresses of functions (as this
  273. information is not usually useful).  It does display an A5 offset for
  274. annonymous built-in functions.  This offset can be helpful when reporting
  275. bugs to Coral.
  276.  
  277. The variable *D* used in the backtrace dialog has been renamed *DEBUG-VALUE*.
  278.  
  279. Two special variables control the print-length and print-level used by TRACE.
  280. These are *TRACE-PRINT-LENGTH* and *TRACE-PRINT-LEVEL*.  They correspond to the
  281. variables *PRINT-LENGTH* and *PRINT-LEVEL* except that they control the output
  282. of the TRACE function rather than the pretty printer.  (See Common Lisp: the
  283. Language, page 372).
  284.  
  285. The macro PRINT-DB is used to print out forms and their values.  PRINT-DB takes
  286. any number of arguments.  For each argument, it prints the argument, and prints
  287. the result of evaluating the argument (except for string constants, which are
  288. only printed once).  All information is printed to *ERROR-OUTPUT*.  PRINT-DB
  289. returns the value of its last argument.  It is semantically equivalent to a
  290. PROGN with the side affect of printing.  PRINT-DB is useful for tracking the
  291. values of variables, and flow of control inside programs.
  292.  
  293. STEP is performed in the null lexical environment and current dynamic
  294. environment, just like EVAL.  If you insert a call to STEP in the middle of
  295. a function, beware that arguments to the function and other lexical entities
  296. will not be visible inside the body of the STEP form.
  297.  
  298. PASCAL RECORDS
  299. Most of the predefined record types described in the manual are no longer
  300. predefined. Instead, they are given as source code in the Records.Lisp file in
  301. the Library folder.  If you need to use records, you may want to look through
  302. this file for record definitions.  To load all the record definitions, you can
  303. evaluate the expression (REQUIRE 'RECORDS).
  304.  
  305. The rectangle record definition is still predefined by Allegro CL.
  306.  
  307. RSET and RREF compile into simply memory accessing functions.  They access
  308. record definitions at compile time, but not at run time.  The same is true of
  309. RLET when initial field values are not given.  All other record functions use
  310. the record definitions at run time.
  311.  
  312. To avoid the need for record definitions at run time, use only RSET, RREF, and
  313. the simple case of RLET.  These operations are also the most efficient. 
  314. Compiled files which use these operations can be loaded and run in a system
  315. that contains no record definitions.
  316.  
  317. The complex case of RLET (where initial values are given) can easily be changed
  318. into the simple case.  For example
  319.  
  320. (rlet ((r :rect
  321.           :topleft #@(10 10)
  322.           :bottomright #@(100 100)))
  323.   . . . )
  324.  
  325. would become
  326.  
  327. (rlet ((r :rect))
  328.   (rset r rect.topleft #@(10 10))
  329.   (rset r rect.bottomright #@(100 100))
  330.   . . .)
  331.   
  332.  
  333. SYSTEM INTERFACE
  334. The definitions for Macintosh traps are no longer compiled into Allegro CL. If
  335. you need to call traps directly, you should load the file Traps.Lisp in the
  336. Library folder.  You may want to selectively comment-out portions of this file,
  337. to avoid loading lots of traps you don't need.  Loading the entire file uses up
  338. about 50K of heap space.  The simplest way to include trap definitions is to
  339. evaluate the form (REQUIRE 'TRAPS).
  340.  
  341. Macintosh traps return boolean values as fixnums.  This fixnum will have
  342. bit 8 turned on if the boolean value is true.  For example
  343. (LOGBITP 8 (_BUTTON :WORD)) will return true if the mouse-button is held down.
  344.  
  345. When passing boolean values to the Macintosh operating system, use -1 as true,
  346. and 0 as false.
  347.  
  348. The function documented as %inc-pointer is actually named %inc-ptr.
  349.  
  350. After disposing of Macintosh pointers, it is important to zero all Lisp
  351. variables holding the pointer (e.g. by setting them to  NIL). If the Macintosh
  352. and Lisp heaps resize, dead pointers may begin pointing into active pages in
  353. the Lisp heap.  This will confuse the garbage collector and probably cause
  354. a crash.
  355.  
  356.  
  357. FILES
  358. When LOAD is passed a filename with no type, it checks for the existence of the
  359. file with no type before checking for files with a .lisp or .fasl added to the
  360. file name.  In the past LOAD always merged with .lisp and .fasl, so that it was
  361. impossible to load files with no type.
  362.  
  363. The :directory keyword to the function CHOOSE-NEW-FILE-DIALOG can specify a
  364. filename as well as a directory.  This filename is used as the default
  365. filename when the dialog is displayed.
  366.  
  367. The variable *OPEN-FILE-STREAMS* is bound to a list of all currently open
  368. files.  This list is useful for closing all open files.
  369.  
  370.  
  371. IMPLEMENTATION NOTES
  372. The search performed by APROPOS is case sensitive.  This means that when
  373. APROPOS is given a string as an argument, the string should generally be
  374. all upper-case (unless you know that you are looking for a symbol containing
  375. lower-case letters).  The Apropos dialog available from the Tools menu
  376. automatically upcases the entered string.
  377.  
  378. *WARN-IF-REDEFINE-KERNEL* determines whether warnings are issued when built-in
  379. non-object functions are redefined.  If it is NIL, no warning is given.  This
  380. variable should usually be non-NIL, but may be bound to NIL when redefining
  381. such functions as SHORT-SITE-NAME.  *WARN-IF-REDEFINE* is still used for
  382. user functions and built-in object functions.
  383.  
  384. The function UNCOMPILE-FUNCTION returns the definition of a compiled function.
  385. This definition is only available if the function was compiled with
  386. *SAVE-DEFINITIONS* non-NIL.
  387.  
  388.  
  389. MANUAL
  390. The manual now includes a glossary, a comprehensive index, and tabs for
  391. dividing chapters.
  392.  
  393. Several typos have been fixed.
  394.  
  395. MISCELLEANOUS
  396. If the cursor is hidden when a garbage collection occurs, the cursor is auto-
  397. matically shown.  You don't have to jiggle the mouse.
  398.  
  399. Functions for calling Macintosh printer drivers have been exported.  These
  400. functions correspond to the high-level functions described in Inside Macintosh
  401. (except that they have '%_' prepended to their names).
  402.  
  403. %_PROPEN          %_PRCLOSE          %_PRINTDEFAULT
  404. %_PRVALIDATE      %_PRSTLDIALOG      %_PRJOBDIALOG
  405. %_PRJOBMERGE      %_PROPENDOC        %_PROPENPAGE
  406. %_PRCLOSEPAGE     %_PRCLOSEDOC       %_PRPICFILE
  407.  
  408. In addition, the function GET-PRINT-RECORD has been exported.  This function
  409. can only be called after %_PROPEN has been called and before %_PRCLOSE has
  410. been called.  It returns a handle to print record (described in Inside
  411. Macintosh).  Note:  all print manager hacking must be surrounded by a call
  412. to WITHOUT-INTERRUPTS.  This is true because Lisp event processing interferes
  413. with the print manager.  The unfortunate side-effect is that such code is
  414. difficult to debug.
  415.  
  416. The function HARDCOPY-FILE takes a single argument, which should be a pathname
  417. to a text file.  It opens a window to the file, prints the window, and closes
  418. the window.  For example:
  419. (HARDCOPY-FILE (CHOOSE-FILE-DIALOG
  420.                 :MAC-FILE-TYPE :TEXT))
  421.  
  422.  
  423. KNOWN BUGS
  424. If code running from the Listener is interruped by a mouse event which
  425. in turn causes an error, (CONTINUE) goes to top level rather than resuming
  426. the listener code.
  427.  
  428. In FORMAT to synonym string of standard output, ~& casues stack overflow.
  429.  
  430. Definitions of the form  (DEF PKG:FOO ...) or (DEF PKG::FOO) are not
  431. properly recognized by EDIT-DEFINITION.
  432.  
  433. Imbalanced parentheses inside a semicolon comment will confuse the backward
  434. matching parentheses feature.
  435.  
  436. The function MAKUNBOUND-ALL does not unbind non-object variables.  It just sets
  437. them to NIL.